<!-- HTML FOR TESTING THE POST COMMAND -->
<html>
	<form action="nothingplaying.php" method="post">
	UserId: <input type="text" name="id" />
	<input type="submit" />
	</form>
</html>

<?php
	if ($_SERVER['REQUEST_METHOD'] == 'POST') {
	
		mysql_connect("localhost","akosciak","MojaPtaszek");
		
		mysql_select_db("songbump") or die( "Unable to select database");

		$id = $_POST["id"];

		$query = "UPDATE Users SET CurrentlyPlaying='0' WHERE Id='".$id."'";
		$result = mysql_query($query);
		
		// Check result
		if (!$result) {
			die();
		}
	}
	
?>
